<html>
	<head>
	    <title>表结构模板</title>
	    <style type="text/css">
	        body {font-family: SimHei;counter-reset: titlefirst;}
			/* counter(page)代表当前页数,counter(pages)代表总页数 */
	        #pagenumber:before {   content: counter(page)'/'counter(pages);  }
	        hr{width: 330px;border:none;border-top:1px solid black;}
	       	.fontClass{font-family: STXihei;}
	        table {border-collapse:collapse;border-spacing:0;}
	        table th{text-align: center;height:30px;font-size: 15px;}
			table td,table th{ border: 0.5px solid #000; }
			.titleTr{background-color: #23a8ea;}
	        table tr{ page-break-inside:avoid;}
	        table td{ padding:0 5px;    }
	        div.header-left {display: none; margin-top: 20px; font-size: 12px;}
	        div.header-right {display: none;margin-top: 20px; font-size: 12px;}  
	        div.leftfooter{display: none;font-size: 12px;}
	        div.footer{display: none; font-size: 12px;}
	        /* 1级标题 */
	        div.title1ShowNo {counter-reset: titlesecond; }
	        /* 2级标题 */
	        div.title2ShowNo {counter-reset: titlethird;}
	        div.title2ShowNo:before {counter-increment: titlesecond; content: counter(titlesecond) "."; }
	        .h_10{height : 10px;}
			.h_20{height : 20px;}
			.h_30{height : 30px;}
			.h_50{height : 50px;}
			.h_100{height : 100px;}
			.h_120{height : 120px;}
			.h_300{height : 300px;}
			.titleFirst {text-align: center;font-size: 29px;height:50px;}
			.titleSecond {text-align: left;font-size: 20px;height:35px;text-indent:0em;margin-top: 10px;}
			.fontSize{font-size: 13px;word-break : normal;word-wrap : break-word;	}
			@media print {
	            div.header-left { display: block;position: running(header-left);}
	            div.header-right {display: block; position: running(header-right); }
	            div.leftfooter { display: block; position: running(leftfooter);}
	            div.footer {display: block; position: running(footer);}
	        }
	        @page {
				margin: 0.7in;
				background:none;
				@top-left { content: element(header-left) };
	     		@top-right { content: element(header-right) };
				@bottom-right { content: element(footer) };
			}
	    </style>
	</head>  
	<body>  
	
		<div id="header-left" class="header-left" align="left">绿盾项目组工作平台<hr/></div>  
		<div id="header-right" class="header-right" align="right">数据库表结构<hr/></div> 
		<div id="footer" class="footer" align="right"><span id="pagenumber"></span></div>
		
		<!-- 正文 -->
		<div class="contInfo" > 
			<div class="h_20"></div>
			<div class="titleFirst title1ShowNo">${dbName! }数据库表结构</div>
<% for ( table in tables ) { %>
				<div class="h_30 titleSecond title2ShowNo" >
					${table.tableName }
					${table.tableComments! }
				</div>
				<table width="99%" height="100%" cellpadding="0" cellspacing="0">
					<colgroup>
						<col width="20%"/>
						<col width="20%"/>
						<col width="15%"/>
						<col width="20%"/>
						<col width="">
					</colgroup>
					<tr class="h_30 titleTr">
						<th class="fontClass" >字段</th>
						<th class="fontClass" >类型</th>
						<th class="fontClass" >是否允许为空</th>
						<th class="fontClass" >默认值</th>
						<th class="fontClass" >备注</th>
					</tr>
	<% for ( column in table.columns ) { %>
					<tr class="h_30">
						<td class="fontSize" >${column.columnName }</td>
						<td class="fontSize fontClass" >${column.columnType }</td>
						<td class="fontSize fontClass" >${column.nullable }</td>
						<td class="fontSize fontClass" >${column.defaultValue }</td>
						<td class="fontSize fontClass" >${column.remarks }</td>
					</tr>
	<% } %>
				</table>
				<div class="h_10"></div>
<% } %>
			
		</div>

	</body>
</html>  
